package com.tianji.learning.utils;

public class InfoContext {
    private static final ThreadLocal<Object> TL = new ThreadLocal<>();
    /**
     * 保存信息
     * @param info
     */
    public static void setInfo(Object info) {
        TL.set(info);
    }

    /**
     * 获取信息
     * @return info
     */
    public static Object getInfo() {
        return TL.get();
    }
    /**
     * 清除信息
     */
    public static void removeInfo() {
        TL.remove();
    }
}
